<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsBookshelfTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('bookshelf', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键id');
			$table->bigInteger('uid')->comment('关联用户id');
			$table->string('book_num', 32)->comment('关联书籍id');
			$table->tinyInteger('status')->nullable()->default(0)->comment('书架状态0为正常1为取消书架');
			$table->integer('join_time')->comment('加入书架时间');
			$table->integer('cancel_time')->comment('取消书架时间');
			$table->string('reading_record', 32)->nullable()->comment('阅读记录章节');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('bookshelf');
	}

}
